<template>
  <div id="app">
    <Header></Header>
    <Search>1111</Search>
  </div>
</template>
<script>
import Header from "./components/Header/header";
import Search from "./components/Search/search"
export default {
  data() {
    return {};
  },
  created() {},
  computed: {},
  created() {},
  mounted() {
    // this.webSocket();
    // console.log(sessionStorage);
    // $("#app").css("min-height", $(window).height());
    // window.onresize = function() {
    //   // $(window).width();
    //   $("#app").css("min-height", $(window).height());
    // };
    // var u = navigator.userAgent;
    // if (u.indexOf("Android") > -1 || u.indexOf("Linux") > -1) {
    //   //安卓手机
    //   this.isAndroid = true;
    // } else if (u.indexOf("iPhone") > -1) {
    //   //苹果手机
    //   this.isAndroid = true;
    // } else if (u.indexOf("Windows Phone") > -1) {
    //   //winphone手机
    //   this.isAndroid = true;
    // } else if (u.indexOf("iPad") > -1) {
    //   //iPad
    //   this.isAndroid = true;
    // }
    // console.log(u);
    // this.Notification();
  },
  methods: {
    // webSocket: function() {
    //   if ("WebSocket" in window) {
    //     console.log("您的浏览器支持 WebSocket!");
    //     // 打开一个 web socket
    //     var ws = new WebSocket("ws://localhost:3003/");
    //     ws.onopen = function() {
    //       // Web Socket 已连接上，使用 send() 方法发送数据
    //       ws.send("发送数据");
    //       console.log("数据发送中...");
    //     };
    //     ws.onmessage = evt => {
    //       var received_msg = evt.data;
    //       console.log("数据已接收..." + received_msg);
    //       if (received_msg.search("c") !== -1) {
    //         this.count = received_msg.split("-")[1];
    //       }
    //       if (received_msg.search("ip") !== -1) {
    //         this.ip = received_msg.split("-")[1].split(",");
    //       }
    //     };
    //     ws.onclose = function() {
    //       // 关闭 websocket
    //       console.log("连接已关闭...");
    //     };
    //   } else {
    //     // 浏览器不支持 WebSocket
    //     console.log("您的浏览器不支持 WebSocket!");
    //   }
    // }
  },
  components: { Header, Search }
};
</script>

<style>
@media screen and (max-width: 1370px) {
  .flexbox {
    height: 670px;
  }
}
@media screen and (max-width: 2000px) and (min-width: 1370px) {
  .flexbox {
    height: 948px;
  }
}
#app {
  position: relative;
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* font-size: 18px; */
  /* cursor: url(../examples/assets/SAOIcon/icon/equipment_normal.png),auto; */
  /* background-image: url("../examples/assets/img/bg2.jpg");
  background-attachment: fixed;
  background-size: cover; */
}
</stylel>
